<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<s:layout-definition>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title><f:message key="${title}" /></title>
            <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/backend/css/all.css" />
            <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
            <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
            <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>

            <script>
                $(function() {
                    $( "#datepicker" ).datepicker({ dateFormat: "dd/mm/yy" });
                    $( "#datepicker2" ).datepicker({ dateFormat: "dd/mm/yy" });
                    $( "#datepicker3" ).datepicker({ dateFormat: "dd/mm/yy" });
                });
            </script>
            <script type="text/javascript">
                function confirm_delete() {
                    return confirm(<f:message key="global.delete_confirm" />);
                }
            </script>
        </head>
        <body> 
            <div align="left">
                
                <shiro:authenticated>
                    <p class="logout"><s:link href="/LogoutUser"><f:message key="global.logout" /></s:link></p>             
                </shiro:authenticated>
                    
            </div>
            <div id="main">
                <div id="header">
                    <ul id="top-navigation">
                        <shiro:hasRole name="receptionist">
                            <li <c:if test="${selectedPage == 'customers'}"> class="active" </c:if>><span><span><s:link beanclass="cz.muni.fi.pa165.bookingmanager.web.CustomerActionBean"><f:message key="moduleNames.customers" /></s:link></span></span></li>
                            <li <c:if test="${selectedPage == 'hotels'}"> class="active" </c:if>><span><span><s:link beanclass="cz.muni.fi.pa165.bookingmanager.web.HotelActionBean"><f:message key="moduleNames.hotels" /></s:link></span></span></li>                
                        </shiro:hasRole>                                                   
                        <shiro:hasRole name="superadmin">
                            <li <c:if test="${selectedPage == 'administrators'}"> class="active" </c:if>><span><span><s:link beanclass="cz.muni.fi.pa165.bookingmanager.web.AdministratorActionBean"><f:message key="moduleNames.administrators" /></s:link></span></span></li>                
                        </shiro:hasRole>
                        <li><span><span><s:link beanclass="cz.muni.fi.pa165.bookingmanager.web.FrontEndActionBean"><f:message key="global.frontend" /></s:link></span></span></li>                                                          
                    </ul>
                </div>  

                <div id="middle">
                    <div id="left-column">
                        <s:layout-component name="left-column" />
                    </div>

                    <div id="center-column">
                        <s:layout-component name="body" />
                    </div>

                    <div id="right-column">
                        <s:layout-component name="right-column" />
                    </div>
                </div>
                <div id="footer">
                    <s:layout-component name="footer" />
                </div>
            </div>
        </body>
    </html>
</s:layout-definition>
